Handle d_type == DT_UNKNOWN correctly
authorMichael Olbrich <m.olbrich@pengutronix.de>
Sun, 29 Sep 2019 11:43:00 +0000 (13:43 +0200)
committerMichael Biebl <biebl@debian.org>
Tue, 19 Nov 2019 08:17:12 +0000 (08:17 +0000)
commit56d4921424755bb17711a79c9276a9c62a423025
treeba251e210a39c9b3f2a38d0b963b23da93133f94
parentd65de1f29c36e8a650a3d9e1c72e32ec28478f99
Handle d_type == DT_UNKNOWN correctly

As documented in the man-page, readdir() may return a directory entry with
d_type == DT_UNKNOWN. This must be handled for regular filesystems.

dirent_ensure_type() is available to set d_type if necessary. Use it in
some more places.

Without this systemd will fail to boot correctly with nfsroot and some
other filesystems.

Closes #13609

(cherry picked from commit 28e68bb23547cbc11cd3f62a1a38dbe2b387b370)
(cherry picked from commit 5c0224c7bf3c4b0f18d44ee9da7e058833b1d8e2)

Gbp-Pq: Name Handle-d_type-DT_UNKNOWN-correctly.patch
src/core/smack-setup.c
src/login/logind-dbus.c
src/login/logind.c
src/shared/bootspec.c
src/shared/unit-file.c